//
//	App_getMusicList.m

#import "App_getMusicList.h"

@implementation App_getMusicList

@end

@implementation App_getMusicListData

+ (NSDictionary *)objectClassInArray {
 	return @{@"music_list" : [App_getMusicListMusic_list class]};
}

- (NSString *)base_url{
    if(_base_url == nil)
    {
        App_getMusicListMusic_list *aSong = self.music_list.firstObject;
        NSString *full_url = aSong.url;
        NSArray *comArr = [full_url componentsSeparatedByString:@"com"];
        if (comArr.count == 2) {
            _base_url = [comArr.firstObject stringByAppendingString:@"com"];
        }else{
            _base_url = @"";
        }
        
    }
    
    return _base_url;
}
@end

@implementation App_getMusicListMusic_list

+ (NSDictionary *)mj_replacedKeyFromPropertyName {
 	return @{@"idField":@"id",};
}
- (NSString *)file_name{
    if(_file_name == nil)
    {
        NSString *full_url = self.url;
        NSArray *comArr = [full_url componentsSeparatedByString:@"com/"];
        if (comArr.count == 2) {
            _file_name = comArr.lastObject;
        }else{
            _file_name = @"";
        }
    }
    
    return _file_name;
}
@end
